package com.zmht.beike.po;

import com.zmht.beike.util.AgeUtil;
import com.zmht.specedu.vo.Teacher;

/**
 * TCaiminfo entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class TCaiminfo implements java.io.Serializable {

	// Fields

	private Integer id;
	
	private String caiminfoName;
	private Integer paraType;
	private String paraValue;
	private Integer term;
	private String enactmentDate;
	private String enactmenter;
	private Integer teacherId;
	private Integer type;
	private Integer share;
	private Integer disabled;

	
	private Integer areaId;//领域id 
	private Teacher teacher;//制定人
	private String termName = "0";//学期名称（上学期，下学期，全学年）
	private String areaName = "";//所属领域名称
	
	private String age;
	private String className;
	private Integer concount;//收藏次数
	// Constructors

	public Integer getConcount() {
		return concount;
	}

	public void setConcount(Integer concount) {
		this.concount = concount;
	}

	public String getAge() {
		age = AgeUtil.getAge(paraValue);
		return age;
	}

	public String getClassName() {
		className = AgeUtil.getClassName(paraValue);
		return className;
	}

	/**
	 * @return the areaName
	 */
	public String getAreaName() {
		if(new Integer(1).equals(areaId)){areaName="健康领域";}
		if(new Integer(2).equals(areaId)){areaName="语言领域";}
		if(new Integer(3).equals(areaId)){areaName="科学领域";}
		if(new Integer(4).equals(areaId)){areaName="艺术领域";}
		if(new Integer(5).equals(areaId)){areaName="社会领域";}
		
		return areaName;
	}

	/**
	 * @param areaName the areaName to set
	 */
	public void setAreaName(String areaName) {
		this.areaName = areaName;
	}

	/**
	 * @return the termName
	 */
	public String getTermName() {
		if(new Integer(0).equals(term)){termName="上学期";}
		if(new Integer(1).equals(term)){termName="下学期";}
		if(new Integer(2).equals(term)){termName="全学期";}
		return termName;
	}

	/**
	 * @param termName the termName to set
	 */
	public void setTermName(String termName) {
		this.termName = termName;
	}

	/**
	 * @return the teacher
	 */
	public Teacher getTeacher() {
		return teacher;
	}

	/**
	 * @param teacher the teacher to set
	 */
	public void setTeacher(Teacher teacher) {
		this.teacher = teacher;
	}

	/**
	 * @return the areaId
	 */
	public Integer getAreaId() {
		return areaId;
	}

	/**
	 * @param areaId the areaId to set
	 */
	public void setAreaId(Integer areaId) {
		this.areaId = areaId;
	}

	/** default constructor */
	public TCaiminfo() {
	}

	/** full constructor */
	public TCaiminfo(Integer paraType, String paraValue, Integer term,
			String enactmentDate, String enactmenter, Integer teacherId,
			Integer type, Integer share, Integer disabled) {
		this.paraType = paraType;
		this.paraValue = paraValue;
		this.term = term;
		this.enactmentDate = enactmentDate;
		this.enactmenter = enactmenter;
		this.teacherId = teacherId;
		this.type = type;
		this.share = share;
		this.disabled = disabled;
	}

	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getParaType() {
		return this.paraType;
	}

	public void setParaType(Integer paraType) {
		this.paraType = paraType;
	}

	public String getParaValue() {
		return this.paraValue;
	}

	public void setParaValue(String paraValue) {
		this.paraValue = paraValue;
	}

	public Integer getTerm() {
		return this.term;
	}

	public void setTerm(Integer term) {
		this.term = term;
	}

	public String getEnactmentDate() {
		return this.enactmentDate;
	}

	public void setEnactmentDate(String enactmentDate) {
		this.enactmentDate = enactmentDate;
	}

	public String getEnactmenter() {
		return this.enactmenter;
	}

	public void setEnactmenter(String enactmenter) {
		this.enactmenter = enactmenter;
	}

	public Integer getTeacherId() {
		return this.teacherId;
	}

	public void setTeacherId(Integer teacherId) {
		this.teacherId = teacherId;
	}

	public Integer getType() {
		return this.type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getShare() {
		return this.share;
	}

	public void setShare(Integer share) {
		this.share = share;
	}

	public Integer getDisabled() {
		return this.disabled;
	}

	public void setDisabled(Integer disabled) {
		this.disabled = disabled;
	}

	public String getCaiminfoName() {
		return caiminfoName;
	}

	public void setCaiminfoName(String caiminfoName) {
		this.caiminfoName = caiminfoName;
	}

}